cmake_minimum_required(VERSION 3.13.4)

project(aoapc_projects)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g")

add_subdirectory(ch1)
add_executable(ex1_1 $<TARGET_OBJECTS:ex1_1_obj>)
add_executable(ex1_2 $<TARGET_OBJECTS:ex1_2_obj>)
add_executable(ex1_3 $<TARGET_OBJECTS:ex1_3_obj>)
add_executable(ex1_4 $<TARGET_OBJECTS:ex1_4_obj>)
add_executable(ex1_5 $<TARGET_OBJECTS:ex1_5_obj>)
add_executable(ex1_6 $<TARGET_OBJECTS:ex1_6_obj>)
add_executable(ex1_7 $<TARGET_OBJECTS:ex1_7_obj>)
add_executable(ex1_8 $<TARGET_OBJECTS:ex1_8_obj>)
add_executable(ex1_9 $<TARGET_OBJECTS:ex1_9_obj>)
add_executable(ex1_10 $<TARGET_OBJECTS:ex1_10_obj>)
add_executable(ex1_11 $<TARGET_OBJECTS:ex1_11_obj>)
add_executable(ex1_12 $<TARGET_OBJECTS:ex1_12_obj>)
add_executable(ex1_13 $<TARGET_OBJECTS:ex1_13_obj>)

add_subdirectory(ch2)
add_executable(ex2_1 $<TARGET_OBJECTS:ex2_1_obj>)
add_executable(ex2_2 $<TARGET_OBJECTS:ex2_2_obj>)
target_link_libraries(ex2_2 PRIVATE -lm)
add_executable(ex2_3 $<TARGET_OBJECTS:ex2_3_obj>)
add_executable(ex2_4 $<TARGET_OBJECTS:ex2_4_obj>)
add_executable(ex2_5 $<TARGET_OBJECTS:ex2_5_obj>)
add_executable(ex2_6 $<TARGET_OBJECTS:ex2_6_obj>)
add_executable(ex2_7 $<TARGET_OBJECTS:ex2_7_obj>)
add_executable(ex2_8 $<TARGET_OBJECTS:ex2_8_obj>)
add_executable(ex2_9 $<TARGET_OBJECTS:ex2_9_obj>)
add_executable(ex2_10 $<TARGET_OBJECTS:ex2_10_obj>)
add_executable(ex2_11 $<TARGET_OBJECTS:ex2_11_obj>)
add_executable(ex2_12 $<TARGET_OBJECTS:ex2_12_obj>)
